import { get } from 'lodash';
import * as Values from '../values';

export default class ConstantValueController {
  static async findAll(req, res, next) {
    try {
      const { key, map } = req.params;
      res.sendOk({
        [key]: get(Values, key, []),
        [map]: get(Values, map, {})
      });
    }
    catch (e) {
      next(e);
    }
  }
}
